package com.neuedu.his.mapper;

import com.neuedu.his.po.Checkapply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
* @author Snowball
* @description 针对表【checkapply】的数据库操作Mapper
* @createDate 2025-06-25 17:11:12
* @Entity com.neuedu.his.po.Checkapply
*/
public interface CheckapplyMapper extends BaseMapper<Checkapply> {
    @MapKey("getinfoByMedicalID")
    public List<Map<String,Object>> getinfoByMedicalID(int id);

    @Select("SELECT ca.*, d.deptname " +
            "FROM checkapply ca " +
            "LEFT JOIN fmeditem fi ON ca.itemid = fi.id " +
            "LEFT JOIN department d ON fi.deptid = d.id " +
            "WHERE ca.registid = #{registid}")
    List<Checkapply> selectWithDeptname(@Param("registid") Integer registid);
}




